ABC289 C - Coverage
提出
code: python
import itertools
n, m = list(map(int, input().split()))
s = []
for _ in range(m):
c = int(input())
a = list(map(int, input().split()))
s.append(set(a))
ans = 0
for v in itertools.product(0, 1, repeat=m): new_s = set()
for i in range(m):
res = True
for j in range(1, n+1):
if j not in new_s:
res = False
break
if res:
ans += 1
print(ans)